Integrand size = 28, antiderivative size = 479 \[ \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {a (e+f x)^3}{3 b^2 f}+\frac {2 f^2 \cos (c+d x)}{b d^3}-\frac {(e+f x)^2 \cos (c+d x)}{b d}-\frac {i a^2 (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} d}+\frac {i a^2 (e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} d}-\frac {2 a^2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} d^2}+\frac {2 a^2 f (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} d^2}-\frac {2 i a^2 f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} d^3}+\frac {2 i a^2 f^2 \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} d^3}+\frac {2 f (e+f x) \sin (c+d x)}{b d^2} \]
-1/3*a*(f*x+e)^3/b^2/f+2*f^2*cos(d*x+c)/b/d^3-(f*x+e)^2*cos(d*x+c)/b/d+2*f *(f*x+e)*sin(d*x+c)/b/d^2-I*a^2*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c))/(a-(a^2- b^2)^(1/2)))/b^2/d/(a^2-b^2)^(1/2)+I*a^2*(f*x+e)^2*ln(1-I*b*exp(I*(d*x+c)) /(a+(a^2-b^2)^(1/2)))/b^2/d/(a^2-b^2)^(1/2)-2*a^2*f*(f*x+e)*polylog(2,I*b* exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b^2/d^2/(a^2-b^2)^(1/2)+2*a^2*f*(f*x+e )*polylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b^2/d^2/(a^2-b^2)^(1/2 )-2*I*a^2*f^2*polylog(3,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b^2/d^3/(a ^2-b^2)^(1/2)+2*I*a^2*f^2*polylog(3,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)) )/b^2/d^3/(a^2-b^2)^(1/2)
Time = 2.36 (sec) , antiderivative size = 531, normalized size of antiderivative = 1.11 \[ \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {-a x \left (3 e^2+3 e f x+f^2 x^2\right )+\frac {3 i a^2 \left (-2 \sqrt {a^2-b^2} d f (e+f x) \operatorname {PolyLog}\left (2,\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )+2 \sqrt {a^2-b^2} d f (e+f x) \operatorname {PolyLog}\left (2,-\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )-i \left (d^2 \left (2 \sqrt {-a^2+b^2} e^2 \arctan \left (\frac {i a+b e^{i (c+d x)}}{\sqrt {a^2-b^2}}\right )+\sqrt {a^2-b^2} f x (2 e+f x) \left (\log \left (1-\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )-\log \left (1+\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )\right )\right )+2 \sqrt {a^2-b^2} f^2 \operatorname {PolyLog}\left (3,\frac {b e^{i (c+d x)}}{-i a+\sqrt {-a^2+b^2}}\right )-2 \sqrt {a^2-b^2} f^2 \operatorname {PolyLog}\left (3,-\frac {b e^{i (c+d x)}}{i a+\sqrt {-a^2+b^2}}\right )\right )\right )}{\sqrt {-\left (a^2-b^2\right )^2} d^3}-\frac {3 b \cos (d x) \left (\left (-2 f^2+d^2 (e+f x)^2\right ) \cos (c)-2 d f (e+f x) \sin (c)\right )}{d^3}+\frac {3 b \left (2 d f (e+f x) \cos (c)+\left (-2 f^2+d^2 (e+f x)^2\right ) \sin (c)\right ) \sin (d x)}{d^3}}{3 b^2} \]
(-(a*x*(3*e^2 + 3*e*f*x + f^2*x^2)) + ((3*I)*a^2*(-2*Sqrt[a^2 - b^2]*d*f*( e + f*x)*PolyLog[2, (b*E^(I*(c + d*x)))/((-I)*a + Sqrt[-a^2 + b^2])] + 2*S qrt[a^2 - b^2]*d*f*(e + f*x)*PolyLog[2, -((b*E^(I*(c + d*x)))/(I*a + Sqrt[ -a^2 + b^2]))] - I*(d^2*(2*Sqrt[-a^2 + b^2]*e^2*ArcTan[(I*a + b*E^(I*(c + d*x)))/Sqrt[a^2 - b^2]] + Sqrt[a^2 - b^2]*f*x*(2*e + f*x)*(Log[1 - (b*E^(I *(c + d*x)))/((-I)*a + Sqrt[-a^2 + b^2])] - Log[1 + (b*E^(I*(c + d*x)))/(I *a + Sqrt[-a^2 + b^2])])) + 2*Sqrt[a^2 - b^2]*f^2*PolyLog[3, (b*E^(I*(c + d*x)))/((-I)*a + Sqrt[-a^2 + b^2])] - 2*Sqrt[a^2 - b^2]*f^2*PolyLog[3, -(( b*E^(I*(c + d*x)))/(I*a + Sqrt[-a^2 + b^2]))])))/(Sqrt[-(a^2 - b^2)^2]*d^3 ) - (3*b*Cos[d*x]*((-2*f^2 + d^2*(e + f*x)^2)*Cos[c] - 2*d*f*(e + f*x)*Sin [c]))/d^3 + (3*b*(2*d*f*(e + f*x)*Cos[c] + (-2*f^2 + d^2*(e + f*x)^2)*Sin[ c])*Sin[d*x])/d^3)/(3*b^2)
Time = 2.09 (sec) , antiderivative size = 432, normalized size of antiderivative = 0.90, number of steps used = 19, number of rules used = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.643, Rules used = {5026, 3042, 3777, 3042, 3777, 25, 3042, 3118, 5026, 17, 3042, 3804, 2694, 27, 2620, 3011, 2720, 7143}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 5026 |
\(\displaystyle \frac {\int (e+f x)^2 \sin (c+d x)dx}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x)^2 \sin (c+d x)dx}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {\frac {2 f \int (e+f x) \cos (c+d x)dx}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2 f \int (e+f x) \sin \left (c+d x+\frac {\pi }{2}\right )dx}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \int -\sin (c+d x)dx}{d}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {2 f \left (\frac {(e+f x) \sin (c+d x)}{d}-\frac {f \int \sin (c+d x)dx}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2 f \left (\frac {(e+f x) \sin (c+d x)}{d}-\frac {f \int \sin (c+d x)dx}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3118 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \int \frac {(e+f x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 5026 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {\int (e+f x)^2dx}{b}-\frac {a \int \frac {(e+f x)^2}{a+b \sin (c+d x)}dx}{b}\right )}{b}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {a \int \frac {(e+f x)^2}{a+b \sin (c+d x)}dx}{b}\right )}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {a \int \frac {(e+f x)^2}{a+b \sin (c+d x)}dx}{b}\right )}{b}\) |
\(\Big \downarrow \) 3804 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {2 a \int \frac {e^{i (c+d x)} (e+f x)^2}{2 e^{i (c+d x)} a-i b e^{2 i (c+d x)}+i b}dx}{b}\right )}{b}\) |
\(\Big \downarrow \) 2694 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {2 a \left (\frac {i b \int \frac {e^{i (c+d x)} (e+f x)^2}{2 \left (a-i b e^{i (c+d x)}+\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}-\frac {i b \int \frac {e^{i (c+d x)} (e+f x)^2}{2 \left (a-i b e^{i (c+d x)}-\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}\right )}{b}\right )}{b}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {2 a \left (\frac {i b \int \frac {e^{i (c+d x)} (e+f x)^2}{a-i b e^{i (c+d x)}+\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}-\frac {i b \int \frac {e^{i (c+d x)} (e+f x)^2}{a-i b e^{i (c+d x)}-\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}\right )}{b}\right )}{b}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {2 a \left (\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}-\frac {2 f \int (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )dx}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}-\frac {2 f \int (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )dx}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b}\right )}{b}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {2 a \left (\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{d}-\frac {i f \int \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )dx}{d}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{d}-\frac {i f \int \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )dx}{d}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b}\right )}{b}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {2 a \left (\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )de^{i (c+d x)}}{d^2}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )de^{i (c+d x)}}{d^2}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b}\right )}{b}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {\frac {2 f \left (\frac {f \cos (c+d x)}{d^2}+\frac {(e+f x) \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^2 \cos (c+d x)}{d}}{b}-\frac {a \left (\frac {(e+f x)^3}{3 b f}-\frac {2 a \left (\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{d}-\frac {f \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{d^2}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {(e+f x)^2 \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{d}-\frac {f \operatorname {PolyLog}\left (3,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{d^2}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b}\right )}{b}\) |
-((a*((e + f*x)^3/(3*b*f) - (2*a*(((-1/2*I)*b*(((e + f*x)^2*Log[1 - (I*b*E ^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*d) - (2*f*((I*(e + f*x)*PolyLog [2, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/d - (f*PolyLog[3, (I*b*E ^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/d^2))/(b*d)))/Sqrt[a^2 - b^2] + (( I/2)*b*(((e + f*x)^2*Log[1 - (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])]) /(b*d) - (2*f*((I*(e + f*x)*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/d - (f*PolyLog[3, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])]) /d^2))/(b*d)))/Sqrt[a^2 - b^2]))/b))/b) + (-(((e + f*x)^2*Cos[c + d*x])/d) + (2*f*((f*Cos[c + d*x])/d^2 + ((e + f*x)*Sin[c + d*x])/d))/d)/b
3.3.25.3.1 Defintions of rubi rules used
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 )/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) *(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q) Int [(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q) Int[(f + g*x) ^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( -(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*C os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Sy mbol] :> Simp[2 Int[(c + d*x)^m*(E^(I*(e + f*x))/(I*b + 2*a*E^(I*(e + f*x )) - I*b*E^(2*I*(e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ [a^2 - b^2, 0] && IGtQ[m, 0]
Int[(((e_.) + (f_.)*(x_))^(m_.)*Sin[(c_.) + (d_.)*(x_)]^(n_.))/((a_) + (b_. )*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/b Int[(e + f*x)^m*Sin[c + d*x]^(n - 1), x], x] - Simp[a/b Int[(e + f*x)^m*(Sin[c + d*x]^(n - 1)/(a + b*Sin[c + d*x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] & & IGtQ[n, 0]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
\[\int \frac {\left (f x +e \right )^{2} \left (\sin ^{2}\left (d x +c \right )\right )}{a +b \sin \left (d x +c \right )}d x\]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1855 vs. \(2 (419) = 838\).
Time = 0.51 (sec) , antiderivative size = 1855, normalized size of antiderivative = 3.87 \[ \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Too large to display} \]
-1/6*(2*(a^3 - a*b^2)*d^3*f^2*x^3 + 6*(a^3 - a*b^2)*d^3*e*f*x^2 + 6*(a^3 - a*b^2)*d^3*e^2*x - 6*a^2*b*f^2*sqrt(-(a^2 - b^2)/b^2)*polylog(3, -(I*a*co s(d*x + c) + a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt(-(a ^2 - b^2)/b^2))/b) + 6*a^2*b*f^2*sqrt(-(a^2 - b^2)/b^2)*polylog(3, -(I*a*c os(d*x + c) + a*sin(d*x + c) - (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt(-( a^2 - b^2)/b^2))/b) - 6*a^2*b*f^2*sqrt(-(a^2 - b^2)/b^2)*polylog(3, -(-I*a *cos(d*x + c) + a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt( -(a^2 - b^2)/b^2))/b) + 6*a^2*b*f^2*sqrt(-(a^2 - b^2)/b^2)*polylog(3, -(-I *a*cos(d*x + c) + a*sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d*x + c))*sqr t(-(a^2 - b^2)/b^2))/b) - 6*(I*a^2*b*d*f^2*x + I*a^2*b*d*e*f)*sqrt(-(a^2 - b^2)/b^2)*dilog((I*a*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) + I* b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) - 6*(-I*a^2*b*d*f^2*x - I*a^2*b*d*e*f)*sqrt(-(a^2 - b^2)/b^2)*dilog((I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) - 6*(-I*a^2*b*d*f^2*x - I*a^2*b*d*e*f)*sqrt(-(a^2 - b^2)/b^2)*dilog(( -I*a*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c))*s qrt(-(a^2 - b^2)/b^2) - b)/b + 1) - 6*(I*a^2*b*d*f^2*x + I*a^2*b*d*e*f)*sq rt(-(a^2 - b^2)/b^2)*dilog((-I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d* x + c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) - 3*(a^2*b*d ^2*e^2 - 2*a^2*b*c*d*e*f + a^2*b*c^2*f^2)*sqrt(-(a^2 - b^2)/b^2)*log(2*...
Timed out. \[ \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
\[ \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )}^{2} \sin \left (d x + c\right )^{2}}{b \sin \left (d x + c\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(e+f x)^2 \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Hanged} \]